<?php
namespace App\Repository\Criteria\Orders;

use App\Repository\Models\Orders;
use Prettus\Repository\Contracts\RepositoryInterface;
use Prettus\Repository\Contracts\CriteriaInterface;

/**
 * 正常订单：包括正式订单和刷单订单
 * Class FormalOrderCriteria
 * @package App\Repository\Criteria\Orders
 */
class FormalOrderCriteria implements CriteriaInterface
{

    public function apply($model, RepositoryInterface $repository)
    {
        $model = $model->where('order_form_type', '!=', Orders::ORDER_FORM_TYPE_TEST);

        return $model;
    }
}